package com.charley.icloud.admin.webapps.sysrole.dao;

import com.charley.icloud.admin.webapps.sysrole.pojo.entity.SysRoleDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysRoleMapper {

    List<SysRoleDO> findAllRole();

    int deleteByPrimaryKey(SysRoleDO record);

    int insert(SysRoleDO record);

    int insertSelective(SysRoleDO record);

    SysRoleDO selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysRoleDO record);

    int updateByPrimaryKey(SysRoleDO record);

    List<SysRoleDO> findPage();

    List<SysRoleDO> findAll();

    List<SysRoleDO> findPageByName(@Param(value="name") String name);

    List<SysRoleDO> findByName(@Param(value="name") String name);

    List<SysRoleDO> findBySysUserPrimaryKey(@Param(value="userId") Long userId);

    int findRoleNumbersByCode(@Param(value = "code") Character code);

    List<Long> findAllMenuOfRole(Long roleId);
}
